Computational requirements: no special requirements. 

Programming language: python3.
Packages: networkx, numpy.
Modules: math, itertools, pickle, string.
Libraries: matplotlib, scipy, pandas.

OS: Ubuntu 18.04.5 LTS
Memory: 7.4 GiB
Processor: Intel® Core™ i7-8565U CPU @ 1.80GHz × 8 
Garphics: Intel® UHD Graphics 620 (WHL GT2)
GNOME: 3.28.2
OS type: 64-bit
Disk: 125.2 GB

Computing time: 5-40 seconds per country

Source of data: openly available data on election results.
Manifesto project database. Requirements: obligation to quote and to store the data and/or documents in a way that allows you to identify their provenance.

Description of the files:
Folder "Games with varying coalition worth" includes the following folders:
code/
	cooperative_game.py
	goldenapp3.py
	gui.py

data/
	Country files, name includes reference number, country, and year (e.g., 1. Germany 2017)

Manifesto project database/
	MPDatasetMPDS2020b.xlsx

output/
	Country output files (4 files):
	 	1. Main output file. Name includes reference number, country, and year (e.g., 1.1 Germany 2017 output.png)
		2-4. Supplementary files used for analysis (not included directly in the paper but can be used for verification). Name includes reference number and decsription (e.g., 1.2 Coalitions.png)  
	
Instructions for reproducing results:
- code and data files should be placed in the same directory
- Manifesto project database is placed in the \home directory
- the code is started from the terminal by entering "python3 gui.py" command
- select a country file in the pop up window. Press "Open".
- press "Run" to execute the file. (One may need to save the file first by pressing "Save").
- the main output is displayed in the terminal: calculated shapley values in column "Strength" and stability coefficients for respective coalitions (countries are referred to as letters).

Folder "Simple games gamson-shapley" includes the following folders:
code/
	cooperative_game.py
	goldenapp3.py
	gui.py

data/
	Country files, name includes reference number, country, and year (e.g., 1.Croatia 2020)


output/
	Country output files (4 files):
	 	1. Main output file. Name includes reference number, country, and year (e.g., 1.1 Croatia 2020 output.png)
		2-4. Supplementary files used for analysis (not included directly in the paper but can be used for verification). Name includes reference number and decsription (e.g., 1.2 Coalitions.png)

t-test/
	t-test.xlsx

Instructions for reproducing results:
- code and data files should be placed in the same directory
- the code is started from the terminal by entering "python3 gui.py" command
- select a country file in the pop up window. Press "Open".
- press "Run" to execute the file. (One may need to save the file first by pressing "Save").
- the main output is displayed in the terminal: calculated shapley values in column "Strength" and stability coefficients for respective coalitions (countries are referred to as letters).
- the numbers displayed in column "Strength" are used to calculate power distribution in the file t-test.xlsx (list "Power distribution", column C).
- stability coefficients are used to for the t-test comparing accuracy of predicting structure of the coalition (list "Coalition structure", column B). 

Folder "Simple games gamson theory" includes the following folders:
code/
	cooperative_game.py
	goldenapp3.py
	gui.py

output/
	Country output files (4 files):
	 	1. Main output file. Name includes reference number, country, and year (e.g., 1.1 Croatia 2020 output.png)
		2-4. Supplementary files used for analysis (not included directly in the paper). Name includes reference number and decsription e.g., (1.2 Coalitions.png)


Instructions for reproducing results:
- code and data files should be placed in the same directory. Data files are the same as in folder "Simple games gamson-shapley".
- the code is started from the terminal by entering "python3 gui.py" command
- select a country file in the pop up window. Press "Open".
- press "Run" to execute the file. (One may need to save the file first by pressing "Save").
- the main output is displayed in the terminal: calculated shapley values in column "Strength" and stability coefficients for respective coalitions (countries are referred to as letters).
- stability coefficients are used to for the t-test comparing accuracy of predicting structure of the coalition (list "Coalition structure", column C).




